﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace TCMS.Models
{
    public class TaskEntity
    {
        public int ID { get; set; }

        [Display(Name = "任务名称")]
        public string Name { get; set; }
        [Display(Name = "工房名称")]
        public string ShopName { get; set; }
        [Display(Name = "产品名称")]
        public string ProductName { get; set; }
        [Display(Name = "状态")]
        public int Status { get; set; }
        [Display(Name = "状态")]
        public string StatusName
        {
            get
            {
                if (Status == 1)
                {
                    return "进行中";
                }
                else if (Status == 2)
                {
                    return "未开始";
                }
                else return "已完成";
            }
        }
        [Display(Name = "批次")]
        public string Batch { get; set; }
        [Display(Name = "开始时间")]
        public DateTime StartTime { get; set; }
        [Display(Name = "结束时间")]
        public DateTime EndTime { get; set; }
        [Display(Name = "主要危险品")]
        public string DangerousProducts { get; set; }
        [Display(Name = "危险工序")]
        public string DangerousProcedure { get; set; }
        [Display(Name = "在制量")]
        public int InPopulating { get; set; }
        [Display(Name = "部门")]
        public string Department { get; set; }
        [Display(Name = "班组")]
        public string Team { get; set; }
        [Display(Name = "带班长")]
        public string TeamLeader { get; set; }
        [Display(Name = "班组安全负责人")]
        public string TeamSafety { get; set; }
        [Display(Name = "部门安全责任人")]
        public string DepartmentSafety { get; set; }
        [Display(Name = "班组联系电话")]
        public string TeamTel { get; set; }
        [Display(Name = "创建者")]
        public string CreateBy { get; set; }
        [Display(Name = "创建时间")]
        public DateTime CreatedTime { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }
    }
}